package com.ruoyi.qywx.service.inters;

import com.ruoyi.common.core.cache.Meta;
import com.ruoyi.qywx.callback.txl.ExtChatEncrypt;
import com.ruoyi.qywx.callback.txl.ExternalTagEncrypt;
import com.ruoyi.qywx.callback.txl.ExternalUserEncrypt;
import com.ruoyi.qywx.callback.txl.PartyEncrypt;
import com.ruoyi.qywx.enums.QyNotificationType;
import com.ruoyi.qywx.getway.entity.QyContact;
import com.ruoyi.qywx.getway.entity.QyDept;

import java.util.Collection;
import java.util.List;

/**
 * @author : hcl
 * @Date : 2023/8/9 15:42
 * 同步企业微信数据service
 */
public interface SyncQiyeService {

    List<QyDept> syncDepts(Meta teamMeta);

    void syncAppTxl(Meta meta);

    void updateUser(QyContact qyContact, Long teamId);

    void deleteUser(String userId, Long teamId);

    void deleteParty(Long id, Long teamId);

    void deletePartys(Collection<Long> deptIds, Long teamId);

    void updateParty(PartyEncrypt encrypt, Long teamId);

    void createParty(PartyEncrypt party, Long teamId);

    void createParties(List<PartyEncrypt> party, Long teamId);

    void createUser(QyContact qyContact, Long teamId);

    void syncQiyeTags(Meta meta);

    /**
     * 添加企业客户事件处理
     */
    void addExternalContact(ExternalUserEncrypt encrypt, Meta meta);

    void delExternalContact(ExternalUserEncrypt encrypt, Long teamId);

    void delFollower(ExternalUserEncrypt encrypt, Long teamId);

    void editExternalContact(ExternalUserEncrypt encrypt, Meta meta);

    void notificationCreateTag(ExternalTagEncrypt encrypt, Meta meta, QyNotificationType type);

    void createExternalChat(Meta meta, String chatId);

    void updateExternalChat(Meta meta, ExtChatEncrypt encrypt);

    void dismissExternalChat(Meta meta, String chatId);
}
